package com.example.onlinereadingsystem.demos.web.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.onlinereadingsystem.demos.web.dto.domain.UserFollow;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.onlinereadingsystem.demos.web.dto.request.MyFansParam;
import com.example.onlinereadingsystem.demos.web.dto.request.MyFollowersParam;
import com.example.onlinereadingsystem.demos.web.dto.vo.MyFansVo;
import com.example.onlinereadingsystem.demos.web.dto.vo.MyFollowersVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author 27935
 * @description 针对表【user_follow(用户关注表)】的数据库操作Mapper
 * @createDate 2025-01-10 15:30:19
 * @Entity com.example.onlinereadingsystem.demos.web.dto.domain.UserFollow
 */
@Mapper
public interface UserFollowMapper extends BaseMapper<UserFollow> {

    /**
     * @auther ljm
     * @create 2025/1/10
     * @describe 获取我的粉丝
     */
    IPage<MyFansVo> getMyFans(@Param("param") MyFansParam param, Page<MyFansVo> page);

    /**
     * @auther ljm
     * @create 2025/1/10
     * @describe 获取我的关注
     */
    IPage<MyFollowersVo> getMyFollowers(@Param("param") MyFollowersParam param, Page<MyFollowersVo> page);

    /**
     * @auther ljm
     * @create 2025/1/10
     * @describe 判断是否关注
     */
    UserFollow isFollowed(@Param("currentUserId") String currentUserId, @Param("userId") String userId);
}




